<%@page import="com.zhuoshi.bean.ProvinceBean"%>
<%@page import="com.zhuoshi.dao.ProvinceDao"%>
<%@page import="com.zhuoshi.dao.ManagerDao"%>
<%@page import="com.zhuoshi.bean.NavigationBean"%>
<%@page import="com.zhuoshi.dao.NavigationDao"%>
<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";

	NavigationDao dao = new NavigationDao();
	List<NavigationBean> list = dao.getDataList(0);
	pageContext.setAttribute("list", list);
	
	
	ManagerDao mDao = new ManagerDao();
	boolean flag = mDao.exists("admin");
	out.print(flag);
	
	
	
	ProvinceDao proDao = new ProvinceDao();
	List<ProvinceBean> proList = proDao.getListByAreaid(1);
	pageContext.setAttribute("proList", proList);

%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    
    <title>My JSP 'test1.jsp' starting page</title>
    
	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta http-equiv="expires" content="0">    
	<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
	<meta http-equiv="description" content="This is my page">
	<!--
	<link rel="stylesheet" type="text/css" href="styles.css">
	-->
	    <link rel="stylesheet" type="text/css" href="./template/H-ui.min.css">
    <link rel="stylesheet" type="text/css" href="./template/H-ui.admin.css">
    <link rel="stylesheet" type="text/css" href="./template/iconfont.css">
    <link rel="stylesheet" type="text/css" href="./template/icheck.css">
    <link rel="stylesheet" type="text/css" href="./template/skin.css" id="skin">
    <link rel="stylesheet" type="text/css" href="./template/style.css">
    <link rel="stylesheet" href="./template/layer.css" id="layui_layer_skinlayercss">

  </head>
  
  <body>
  <hr />
  <c:forEach items="${proList }" var="proBean">
  	 ${proBean.id }=== ${proBean.province } <br />
  </c:forEach>
  <br />
    <hr />
    <c:forEach var="bean" items="${list }">
    <c:if test="${bean.class_layer==1 }">
    ${bean.title }(${bean.id })  <br />
    </c:if>
    
    <c:if test="${bean.class_layer==2 }">
    &nbsp;&nbsp;|-${bean.title } (${bean.id }) <br />
    </c:if>
    <hr />
    </c:forEach>
    <hr />
   	<br />
   	<br />
   	<br />
   	<br />
   	
   	<%
   		NavigationDao treeDao = new NavigationDao();
   		//List<NavigationBean> nodes = treeDao.getList(0);
   		//NavigationDao daoTree = new NavigationDao(nodes);
   		//String treeMenu = daoTree.buildTree();
   		//pageContext.setAttribute("treeMenu", treeMenu);
   	 %>
   	${treeMenu }
   	
   	<hr color=red>
    
    
  </body>
</html>
